package com.dogantekin.allseeingeye.data;

import java.util.ArrayList;

import android.content.Context;
import android.graphics.BitmapFactory;
import android.location.Location;

import com.dogantekin.allseeingeye.R;
import com.dogantekin.allseeingeye.util.LocationItem;

public class DataFactory {
	private static DataFactory instance;
	private 	   Context	   context;
	
	private DataFactory(Context context) {		
		super();
		this.context = context;
	}
	
	public static DataFactory getInstance(Context context) {
		if(instance == null) {
			instance = new DataFactory(context);
		}
		return instance;
	}
	
	public ArrayList<LocationItem> getLocationItems(Location location) {
		ArrayList<LocationItem> locationItems = new ArrayList<LocationItem>();

		LocationItem cikisKapisi = new LocationItem("Cikis kapisi","www.cikiskapisi.com","",40.787396,29.440269);
		cikisKapisi.setImage(BitmapFactory.decodeResource(context.getResources(), R.drawable.cikis));
		locationItems.add(cikisKapisi);
		LocationItem mam = new LocationItem("MAM binasi","www.tubitak.org","5321234567",40.783626,29.448166);
		mam.setImage(BitmapFactory.decodeResource(context.getResources(), R.drawable.mam));
		locationItems.add(mam);
		LocationItem tusside = new LocationItem("Tusside lojmanlari","www.tusside.org","5331234567",40.793181,29.469259);
		tusside.setImage(BitmapFactory.decodeResource(context.getResources(), R.drawable.tusside));
		locationItems.add(tusside);
		LocationItem parke = new LocationItem("Parke fabrikasi","www.parkeci.com","5341234567",40.797047,29.463766);
		parke.setImage(BitmapFactory.decodeResource(context.getResources(), R.drawable.parke));
		locationItems.add(parke);
		return locationItems;
	}
}